package com.sanji.sjmallconfig;

import com.sanji.sjmallapp.MallApplication;
import com.sanji.sjmallutils.Codec;

/**
 * API 地址类
 * Created by zsf on 16-12-8.
 */
public class ConfigAPI {
    public static String BASE_URL = "http://www.3j1688.com/appApi/";//线上商城
    //    public static String BASE_URL = "http://www2.3j1688.com/appApi/";//


    public static void setAbsoluteUrl(String url) {
        BASE_URL = url;
        MallApplication.myShare.put("BASE_URL", url);
    }

    public static String getAbsoluteUrl() {
        String url = MallApplication.myShare.getString("BASE_URL", BASE_URL);
        return url;
    }

    public static String LOGIN_URL = getAbsoluteUrl() + "login/check";//登录
    public static String GOODS_HOT_URL = getAbsoluteUrl() + "goodsHot/getHotList";//本日、本周、本月热销
    public static String GOODS_TYPE_URL = getAbsoluteUrl() + "goods/allBrands/";//根据前端类目、搜索商品
    public static String GOODS_PART_BRAND_URL = getAbsoluteUrl() + "goods/initBrands";//配件类型、品牌接口
    public static String GOODS_SEARCH_URL = getAbsoluteUrl() + "goods/all/";//综合查找商品接口
    public static String GOODS_DETAILS_URL = getAbsoluteUrl() + "goods/details/";//商品详情
    public static String ADD_SHOPCAR = getAbsoluteUrl() + "carts/";//添加购物车
    public static String MAIN_BANNER_URL = getAbsoluteUrl() + "common/switchPic";//首页的图片轮播
    public static String SCORE_URL = getAbsoluteUrl() + "users/points/";//查询积分
    public static String MY_ORDER_URL = getAbsoluteUrl() + "orders/queryOrders?";//我的订单
    public static String MY_ORDER_CANCEL_URL = getAbsoluteUrl() + "orders/concelOrder";//取消我的订单
    public static String MY_ORDER_NUMBER_URL = getAbsoluteUrl() + "orders/queryStatusNum/";//我的订单的数量
    public static String SHOP_CAR_LIST_URL = getAbsoluteUrl() + "carts/";// 购物车商品列表
    public static String SHOP_CAR_DELT_URL = getAbsoluteUrl() + "carts/delete";// 删除购物车项
    public static String SHOP_CAR_MODILY_URL = getAbsoluteUrl() + "carts/modify";// 修改购物车项数量
    public static String ORDER_PUSH_URL = getAbsoluteUrl() + "orders/topay";// 提交订单
    public static String ORDER_PAY_URL = getAbsoluteUrl() + "yeepay/payOrder";// 进行支付
    public static String VERSION_LASTEST_URL = getAbsoluteUrl() + "common/getLastestVersion";// 获取最新版本信息
    public static String REGION_URL = getAbsoluteUrl() + "regions/search/byParent?";//获取区域
    public static String REGISTER_URL = getAbsoluteUrl() + "user/addRegisterUser?";//申请注册
    public static String USER_INFO_URL = getAbsoluteUrl() + "user/findById";//获取会员信息接口
    public static String IMPROVE_USER_INFO_URL = getAbsoluteUrl() + "user/complete";//完善会员信息接口
    public static String MOBILECODE_URL = getAbsoluteUrl() + "/user/getMobileCodeByMobile?";//发送验证码
    public static String TEST_MOBILE_URL = getAbsoluteUrl() + "/user/existMobileCode?";//验证验证码
    public static String CHANGE_PASSWORD_URL = getAbsoluteUrl() + "/user/modify/";//修改密码
    public static String SAVE_ADDRESS = getAbsoluteUrl() + "shipingAddress/";//保存收货地址
    public static String ORDER_QUERY = getAbsoluteUrl() + "yeepay/query";//通联支付宝查询


    public static String GET_AREA = "http://youwan.sdxysw.cn/index.php/Api/get_area";



    //获取手机壳数据
    public static String DIY_BASE_URL = Codec.getShellUrl();//app diy 测试

    public static String PHONE_SHELL_FILTER = DIY_BASE_URL + "category/";//手机壳定制品牌筛选条件
    public static String PHONE_SHELL_GOODS = DIY_BASE_URL + "goods?";//手机壳定制品牌筛选条件
    public static String PHONE_SHELL_ADD_CART = DIY_BASE_URL + "addCart";//提交订单
    public static String PHONE_SHELL_GET_CART = DIY_BASE_URL + "cart";//购物车列表
    public static String PHONE_SHELL_DELT_ORDER = DIY_BASE_URL + "order/cancelOrder/";//删除订单
    public static String PHONE_SHELL_ORDER_REDO = DIY_BASE_URL + "redo?orderNum=";//订单重做
    public static String PHONE_SHELL_ORDER_TOPAY = DIY_BASE_URL + "toPay?ids=";//订单重做
    public static String PHONE_SHELL_ORDER_PAY = DIY_BASE_URL + "appPay";//支付
    public static String PHONE_SHELL_ORDER_LIST = DIY_BASE_URL + "order/list?";//订单列表
    public static String PHONE_SHELL_ORDER_DEST = DIY_BASE_URL + "orderItem?orderNum=";//订单详情
    public static String PHONE_SHELL_PROPERTY = DIY_BASE_URL + "property/";//查询工艺


}
